package com.hc;

public class User {
    private String name;

    public User() {
        System.out.println("User无参构造执行");
    }

    public void init(){
        System.out.println("User初始化被调用");
    }

    public void destroy(){
        System.out.println("User销毁被调用");
    }
    @Override
    public String toString() {
        return "User{" +
                "name='" + name + '\'' +
                '}';
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}
